package com.maxd.respository.helpTask;

import com.maxd.model.HelpLuckyDetails;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.Repository;
import org.springframework.data.repository.query.Param;

public interface HelpLuckyDetailsRepository extends Repository<HelpLuckyDetails, Long> {


    @Query(value = "select * from help_lucky_details where user_id=:userId ",
            countQuery = "select count(*) from help_lucky_details where user_id=:userId"
            ,nativeQuery = true)
    Page<HelpLuckyDetails> selectHelpLuckyDetailsListByUserId(Pageable pageable,@Param("userId") Long userId);


}
